package cn.yhbk.web.modules.manager.Mapper;

import cn.yhbk.web.modules.manager.Pojo.Entity.TbGpaFlowPath;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 绩点评定顺序 Mapper 接口
 * </p>
 *
 * @author 有何不可
 * @since 2023-08-05
 */
@Mapper
public interface TbGpaFlowPathMapper extends BaseMapper<TbGpaFlowPath> {

    /**
     * @param order 顺序
     * @param var 变量，是增加还是减少
     * @return
     */
    int updateOrder(@NotNull @Param("order") Integer order, @NotNull @Param("var") Integer var);

    //拿到当前order后面得数量
    int getAfterCount(@Param("order") Integer order);

    int deleteByOrder(@Param("order") Integer order);

    Integer getLastOrder();
}
